-- GENERATED SPELL FOR [Blastmaster Emi Shortfuse] --


function spell0_7998(pUnit, Event) --@Explosion,n/a--
pUnit:FullCastSpellOnTarget(12158,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_7998', 526, 1)
end

function spell1_7998(pUnit, Event) --@Explosion,n/a--
pUnit:FullCastSpellOnTarget(12159,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_7998', 609, 1)
end

function spell2_7998(pUnit, Event) --@Red Streaks Firework,Self--
pUnit:FullCastSpellOnTarget(11542,pUnit)
pUnit:RegisterEvent('Sorts_7998', 611, 1)
end

function Sorts_7998(pUnit, Event)
local choix_sorts_7998 = math.random(0, 2)
if choix_sorts_7998 == 0 then
pUnit:RegisterEvent('spell0_7998', 1, 1)
end
if choix_sorts_7998 == 1 then
pUnit:RegisterEvent('spell1_7998', 1, 1)
end
if choix_sorts_7998 == 2 then
pUnit:RegisterEvent('spell2_7998', 1, 1)
end
end

function mob7998_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_7998', math.random(1500, 3000), 1)
end

function mob7998_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob7998_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob7998_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(7998, 1, 'mob7998_Action')
RegisterUnitEvent(7998, 2, 'mob7998_Leave')
RegisterUnitEvent(7998, 3, 'mob7998_Kill')
RegisterUnitEvent(7998, 4, 'mob7998_Die')
